class Colegio < ActiveRecord::Base
  set_table_name 'colegio'

  belongs_to :city, :foreign_key => "cidade"
  belongs_to :colegiotype, :foreign_key => "tipocolegio"

  validates_presence_of :id
  validates_presence_of :nome
  validates_presence_of :cidade
  validates_presence_of :tipocolegio
  validates_uniqueness_of :id
  validates_numericality_of :id
end
